package com.smartfactory.sail.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.smartfactory.sail.entity.Dept;
import com.smartfactory.sail.entity.Item;
import com.smartfactory.sail.entity.enums.ItemStatusEnum;
import com.smartfactory.sail.vo.PageParam;
import com.smartfactory.sail.vo.item.*;

import java.util.Map;

/**
 * <p>
 * 物料表,生产原料,原料,产品表 服务类
 * </p>
 *
 * @author 王巨壁
 * @since 2019-07-24
 */
public interface IItemService extends IService<Item> {

    Long addProduct(AddProjectReq req, ItemStatusEnum status);
    Long addMaterial(AddMaterialReq req);

    IPage<ListItemResp> listItem(Map<String, Object> queryParam, PageParam pageParam);

    //原料列表
    IPage<ListMaterialResp> listMaterials(Map<String,Object> queryParam, PageParam pageParam);

    ProjectInfoResp getProductInfoById(Long id);

    /**
     * 根据itemId 修改状态
     *
     * @param itemId
     * @param status
     * @return
     */
    Boolean updateProductStatus(Long itemId, String status);

    Dept getDeptByItemId(Long itemId);
}
